﻿<UserControl x:Class="FM.录音.Views.录音视图"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:viewModels="clr-namespace:FM.录音.ViewModels"
             xmlns:views1="clr-namespace:FM.录音.Views"
             d:DataContext="{d:DesignInstance Type={x:Type viewModels:录音视图ViewModel}}"
             d:DesignHeight="500"
             d:DesignWidth="300"
             mc:Ignorable="d">
    <UserControl.Resources />
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />

        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0"
                   HorizontalAlignment="Center"
                   VerticalAlignment="Center"
                   FontSize="24"
                   Text="{Binding 名称}"
                   TextWrapping="Wrap" />

        <views1:电平表2 Grid.Row="1" DataContext="{Binding 电平值}" />

        <Ellipse Grid.Row="1"
                 Width="20"
                 Height="20"
                 Margin="0,10"
                 VerticalAlignment="Bottom"
                 Fill="Red"
                 Visibility="{Binding Is录音闪现,
                                      Converter={StaticResource BooleanToVisibilityConverter}}" />


        <Grid Grid.Row="2" Visibility="{Binding Is全屏, Converter={StaticResource Bool真隐藏}}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <CheckBox Grid.Row="0"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Center"
                      Content="监视: "
                      FontSize="18"
                      IsChecked="{Binding Is监视,
                                          Mode=TwoWay}"
                      Style="{DynamicResource 开关样式}" />
            <CheckBox Grid.Row="1"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Center"
                      Content="录音: "
                      FontSize="18"
                      IsChecked="{Binding Is录音,
                                          Mode=TwoWay}"
                      Style="{DynamicResource 开关样式}" />
            <CheckBox Grid.Row="2"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Center"
                      Content="监听: "
                      FontSize="18"
                      IsChecked="{Binding Is监听,
                                          Mode=TwoWay}"
                      Style="{DynamicResource 开关样式}" />
            <StackPanel Grid.Row="3"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Orientation="Horizontal">
                <TextBlock Text="监视:" />
                <TextBlock Text="{Binding 录音声卡}" />
            </StackPanel>
            <StackPanel Grid.Row="4"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Orientation="Horizontal">
                <TextBlock Text="监听:" />
                <TextBlock Text="{Binding 监听声卡}" />
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
